<!DOCTYPE html>
<html lang="zh-cn">
<!--包含头部-->
{{include file="{{$smarty.const.APP_PATH}}Home/View/Public/header.html"}}
<body>
<div class="lefter">
    <div class="logo"><a href="/"><img src="/images/logo.png" alt="后台管理系统" /></a></div>
</div>
<div class="righter nav-navicon" id="admin-nav">
    <div class="mainer">
        <!--导航-->
        {{include file="{{$smarty.const.APP_PATH}}Home/View/Public/nav.html"}}
        <div class="admin-bread">
            <span>您好，admin，欢迎您的光临。</span>
            <ul class="bread">
                <li><a href="index.html" class="icon-cog">文章管理</a></li>
                <li>添加文章</li>
            </ul>
        </div>
    </div>
</div>

<div class="admin">

    <div class="tab">
        <div class="padding border-bottom">
            <!--<input type="button" class="button active button-small" value="添加文章" />-->
            <input type="button" class="button button-small border-yellow" value="文章列表" onclick="javascript:window.location.href='/article/index'"/>
        </div>
        <div class="tab-body">
            <br />
            <div class="tab-panel active" id="tab-set">
                <form method="post" class="form-x" action="/article/index/article_add_post" enctype="multipart/form-data">
                    <input name="article_id" value="{{$article_id}}" type="hidden">
                    <div class="form-group">
                        <div class="label"><label for="category_id">所属分类:</label></div>
                        <div class="field">
                            <select id="category_id" name="category_id">
                                {{foreach from=$category_list item=i}}
                                <option value="{{$i.category_id}}" {{if $i.category_id==$smarty.session.admin_category_id}}selected="selected"{{/if}} >{{$i.category_name}}</option>
                                {{/foreach}}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="label"><label for="article_title">文章标题</label></div>
                        <div class="field">
                            <input type="text" class="input input-auto" id="article_title" name="article_title" size="50" placeholder="文章标题" data-validate="required:请填写文章标题" value="{{$article_info['article_title']}}" />
                        </div>
                    </div>
                    <!--
                    <div class="form-group">
                        <div class="label"><label for="article_title">所属部门</label></div>
                        <div class="field">
                            <input type="text" class="input input-auto" id="article_dept" name="article_dept" size="50" placeholder="所属部门" value="{{$article_info['article_dept']}}" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="label"><label for="article_content">文章内容:</label></div>
                        <div class="field">
                            <textarea data-validate="required:请填写文章内容" placeholder="请填写文章内容" cols="50" rows="5"  id="article_content" name="article_content" style="width:800px;height:400px;">{{$article_info['article_content']}}</textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="label"><label for="article_thumb">缩略图(头像):</label></div>
                        <div class="field">
                            <a class="button input-file" href="javascript:void(0);">+ 浏览文件<input size="100" type="file" id="article_thumb" name="article_thumb" data-validate="required:请选择上传图片,regexp#.+.(jpeg|jpg|png|gif)$:只能上传jpeg|jpg|png|gif格式图片" /></a>
                        </div>
                    </div>-->
                    <div class="form-group">
                        <div class="label"><label>缩略图(头像):</label></div>
                        <div class="field">
                            <a class="button input-file" href="javascript:void(0);">+ 浏览文件<input size="100" type="file" id="article_thumb" name="article_thumb" /></a>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="label"><label for="article_sort">排序</label></div>
                        <div class="field">
                            <input type="text" class="input input-auto" id="article_sort" name="article_sort" size="50" placeholder="排序" data-validate="required:请填写排序" value="999" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="label">
                            <label>文章类型</label>
                        </div>
                        <div class="field">
                            <div class="button-group button-group-small radio">
                                <label class="button " >
                                    <input name="article_type" value="1" type="radio" ><span class="icon icon-check"></span>节目
                                </label>
                                <label class="button active">
                                    <input name="article_type" value="2" type="radio" checked="checked"><span class="icon icon-times"></span>演员
                                </label>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="label">
                            <label>演员性别</label>
                        </div>
                        <div class="field">
                            <div class="button-group button-group-small radio">
                                <label class="button {{if $smarty.session.admin_article_sex==1}}active{{/if}}" >
                                    <input name="article_sex" value="1" type="radio" {{if $smarty.session.admin_article_sex==1}}checked="checked"{{/if}}><span class="icon icon-check"></span>男士
                                </label>
                                <label class="button {{if $smarty.session.admin_article_sex==2}}active{{/if}}">
                                    <input name="article_sex" value="2" type="radio" {{if $smarty.session.admin_article_sex==2}}checked="checked"{{/if}}><span class="icon icon-times"></span>女士
                                </label>
                                <label class="button {{if $smarty.session.admin_article_sex==3}}active{{/if}}">
                                    <input name="article_sex" value="3" type="radio" {{if $smarty.session.admin_article_sex==3}}checked="checked"{{/if}}><span class="icon icon-times"></span>保密
                                </label>
                            </div>
                        </div>
                    </div>
                    <!--
                    <div class="form-group">
                        <div class="label"><label for="article_sort">演员角色</label></div>
                        <div class="field">
                            <input type="text" class="input input-auto" id="article_role" name="article_role" size="50" placeholder="演员角色" value="{{$article_info.article_role}}" />
                        </div>
                    </div>-->
                    <div class="form-group">
                        <div class="label">
                            <label>是否显示</label>
                        </div>
                        <div class="field">
                            <div class="button-group button-group-small radio">
                                <label class="button active" >
                                    <input name="article_show" value="1" type="radio" checked="checked"><span class="icon icon-check"></span>显示
                                </label>
                                <label class="button">
                                    <input name="article_show" value="2" type="radio" ><span class="icon icon-times"></span>隐藏
                                </label>
                            </div>
                        </div>
                    </div>
                    <div class="form-button"><button class="button bg-main" type="submit">提交</button></div>
                </form>
            </div>
        </div>
    </div>
    <!--包含底部-->
    {{include file="{{$smarty.const.APP_PATH}}Home/View/Public/footer.html"}}
</div>

<div class="hidden"><script src="#" language="JavaScript"></script></div>
</body>
</html>

<!--百度编辑器-->
<script type="text/javascript" charset="utf-8" src="/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/ueditor/ueditor.all.min.js"> </script>
<!--百度编辑器配置-->
<script type="text/javascript">
    //实例化编辑器
    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
    var ue = UE.getEditor('article_content');
</script>